package com.cnap.model.application;

import cn.hutool.core.text.CharSequenceUtil;

/**
 * <类文件描述>
 *
 * @author xc
 **/
public enum CategoryEnum implements ValidInterface {
    /**
     * ai
     */
    CATEGORY_AI("AI"),
    /**
     * /大数据
     */
    CATEGORY_BIG_DATA("BIGDATA");
    private final String value;

    CategoryEnum(String value) {
        this.value = value;
    }

    /**
     * 获取值
     *
     * @return 值
     */
    public String getValue() {
        return value;
    }


    @Override
    public boolean isValid(String value) {
        if (CharSequenceUtil.isEmpty(value)) {
            return false;
        }
        CategoryEnum[] categoryEnums = CategoryEnum.values();
        for (CategoryEnum categoryEnum : categoryEnums) {
            if (categoryEnum.getValue().equals(value)) {
                return true;
            }
        }
        return false;
    }

}
